﻿// Filters
.form-filter {
    width: @screen-tablet;
    margin-bottom: @base-unit * 2;
    // Cell for field label
    .filter-form-label-cell {
        font-size: @font-size-base;
        .make-column(@screen-tablet;
        3);
        padding-right: @grid-gutter-width;
    }
    // Cell for condition
    .filter-form-condition-cell {
        font-size: @font-size-base;
        .make-column(@screen-tablet;
        3.75);
        padding-right: @grid-gutter-width-half;
    }
    // Cell for form control
    .filter-form-value-cell {
        .make-column(@screen-tablet;
        5.25);

        .form-control, .cms-input-group, .cms-form-group-btn, .cms-form-group-text {
            .inline-input();
        }

        .form-control {
            font-size: @font-size-base;
            max-width: 100%;
        }
    }
    // Cell for condition panel in generated filter control
    .form-condition-cell-generated {
        font-size: @font-size-base;
        .make-column(@screen-tablet;
        5);
        padding-right: @grid-gutter-width-half;
    }
    // Cell for generated filter control
    .form-value-cell-generated {
        .make-column(@screen-tablet;
        7);

        .form-control, .cms-input-group, .cms-form-group-btn, .cms-form-group-text {
            .inline-input();
        }

        .form-control {
            font-size: @font-size-base;
            max-width: 100%;
        }
    }
    // Cell for form control on wide filter
    .filter-form-value-cell-wide {
        .make-column(@screen-tablet;
        9);

        .form-control {
            max-width: 100%;
        }

        i {
            margin-right: @base-unit * 0.5;
        }
    }
    // Cell for form control on wide filter
    .filter-form-value-cell-wide-200 {
        .make-column(@screen-tablet;
        12);

        .form-control {
            max-width: 100%;
        }
    }
    // Cell for buttons
    .filter-form-buttons-cell {
        .text-right;
        .fix-white-space();
        .make-column(@screen-tablet;
        8.25);

        // Fix for extra white spaces. E.g. in Abuse report
        .Chrome& {

            .btn + .btn {
                margin-right: @base-unit * -0.25;
            }
        }
    }
    // Cell for form control on filter with advanced link
    .filter-form-buttons-cell-narrow {
        .text-right;
        .fix-white-space();
        .make-column(@screen-tablet;
        5.25);
    }
    // Cell for buttons on wide filter
    .filter-form-buttons-cell-wide {
        .text-right;
        .fix-white-space();
        .make-column(@screen-tablet;
        12);
        // Fix for extra white spaces. E.g. in Friends
        .Chrome& {

            .btn + .btn {
                margin-right: @base-unit * -0.25;
            }
        }
    }
    // Search input
    .form-search-container {
        &.filter-form-value-cell-wide {
            .text-right;
            .make-column(@screen-tablet;
            8.25);
        }
    }
    // Wide filter with simple/advanced link
    .filter-form-buttons-cell-wide-with-link {
        .text-right;
        .fix-white-space();
        .make-column(@screen-tablet;
        9);
        // Fix for extra white spaces. E.g. in Contact Management
        .Chrome& {

            .btn + .btn {
                margin-right: @base-unit * -0.25;
            }
        }
    }
    // Simple/Advanced link cell
    .form-group-buttons {
        // Align right because of basicform layout
        .text-right;

        .filter-form-label-cell {
            .text-left;
            // Link
            .simple-advanced-link {
                display: inline-block;
                margin-top: @base-unit * 0.375;
            }
        }
    }
}
// Search results
.search-results {
    .highlight {
        background-color: @color-orange-100;
    }

    .date {
        padding-left: @base-unit * 0.5;
    }

    .smart-search,
    .sql-search {
        margin-bottom: @base-unit * 1.5;
    }
}

// Permission filter for roles, permissions, etc.
.permission-filter {
    padding: @base-unit @base-unit @base-unit * 0.5 @base-unit;
    background: @color-white;
}

.attachment-filter {
    .form-control {
        margin-right: 0;
    }
}
